<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="js/common.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="css/sdsway2_style.css"/>
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width, height=device-height" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>[PPS]${ptName}</title>
<script>
$(window.document).ready(function(){
	$("#authorizationDiv").hide();
	if( !isMobile() ) $("#authorizationTable").show();
});

function checkAuthorization(url, urlName) {
	var formObj = document.getElementById("pageForm");
	formObj.action = url;
	
	if (url != "loginPage.do") {
		$("#authorizationDiv").show();
		$("#authorizationMessage").text(urlName + " - 인증번호를 입력하세요.");
	} else {
		formObj.submit();
	}
}

function authorizationPageSubmit() {

	var pw = $("#authorizationCode").val();
	if (pw != "2212") {
		$("#authorizationMessage").text("인증번호 오류!");
		return;
	}
	$("#authCd").val(pw);

	var formObj = document.getElementById("pageForm");
	formObj.submit();
}
</script>
</head>
<body class="indexBody">
	<div class="indexTitle">
		Welcome To PPS
	</div>
	<table class="indexPage">
		<tr >
			<td style="text-align:center"><img src="/img/ico_smartPhone.png" alt="리모콘" onclick="checkAuthorization('loginPage.do');" style="width:100px; height:100px;" /></td>
			<td style="text-align:center"><img src="/img/ico_moreInfo.png" alt="부가정보" onclick="" style="width:100px; height:100px;" /></td>
		</tr>
	</table>
	<table id="authorizationTable"  class="indexPage" style="display:none;">
		<tr >
			<td style="text-align:center"><img src="/img/ico_screen.png" alt="스크린" onclick="checkAuthorization('screen.do', 'Screen');" style="width:100px; height:100px;"/></td>
			<td style="text-align:center"><img src="/img/ico_dashBoard.png" alt="제어판" onclick="checkAuthorization('dashBoard.do', 'DashBoard');" style="width:100px; height:100px;"/></td>
		</tr>
	</table>
	
	<!-- 
	<table class="indexPage">
		<colgroup>
			<col width="10%"></col>
			<col width="90%"></col>
		</colgroup>
		<tr>
			<td class="metroColor4"></td>
			<td class="metroColor1">
				<img src="img/remocon.png" onclick="checkAuthorization('loginPage.do');" style="width:200px; height:200px;" />
			</td>
		</tr>
	</table>
	<table id="authorizationTable" class="indexPage" style="display:none;">
		<colgroup>
			<col width="10%"></col>
			<col width="30%"></col>
			<col width="25%"></col>
			<col width="35%"></col>
		</colgroup>
		<tr>
			<td class="metroColor2"></td>
			<td class="metroColor2"></td>
			<td class="metroColor1"><a href="#" onclick="checkAuthorization('screen.do', 'Screen');">Screen</a></td>
			<td class="metroColor3"><a href="#" onclick="checkAuthorization('dashBoard.do', 'DashBoard');">DashBoard</a></td>
		</tr>		
	</table>
	-->
	<div id="authorizationDiv">
		<div id="authorizationMessage"></div>
		<span>인증번호 : </span><input type="password" id="authorizationCode" />
		<input type="button" value="확인" onclick="authorizationPageSubmit();"/>
	</div>
	 
	<form id="pageForm" method="post">
		<input type="hidden" id="tempKeyword" name="tempKeyword" value="right" />
		<input type="hidden" id="authCd" name="authCd" />
	</form>
</body>
</html>